
package fhedu;

import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

public class CellPH extends Cell {
    
     public CellPH(String text, int rong, int cao, int mauchu, int mauvien, int maunen)
    {
//        super(false);
        this.text=text;
        this.rong=rong;
        this.cao=cao;
        this.mauchu=mauchu;
        this.mauvien=mauvien;
        this.maunen=maunen;
    }
    int x=0,y=0;
    void Focus(Graphics g)
    {
        int rgb[]=new int[rong*cao];
        Image focus;
        focus=Image.createImage(this.rong,this.cao);
        Graphics gfocus= focus.getGraphics();
        gfocus.setColor(0x0000ff);
        gfocus.fillRect(0, 0, rong, cao);
        focus.getRGB(rgb, 0, rong, 0, 0, rong, cao);
        for(int i=0,n=rgb.length;i<n;i++)
        {
            rgb[i]&=0x77ffffff;
        }
        g.drawRGB(rgb, 0, rong, x, y, rong, cao, true);
        
        
    }
    void UnFocus(Graphics g)
    {
        VeCell(g, x, y);        
    }
    
}
